The invention relates to a microcontroller according to the preamble of patent claim 1, a switched-mode power supply according to patent claim 10, a ballast for at least one electric lamp according to the preamble of patent claim 11, and a method of operating at least one electric lamp according to the preamble of patent claim 25.
In particular, the invention relates to a microcontroller which is provided to drive the switching transistors of a switched-mode power supply, to be specific preferably of a switched-mode power supply for operating electric lamps. In the switched-mode power supplies normally used to operate electric lamps, there are normally inverters, in particular half-bridge, full-bridge and push-pull inverters, and also step-up converters and step-down converters. Modern electronic ballasts for operating electric lamps generally have an inverter to produce a high-frequency alternating current for lamp operation and often also have a step-up converter as a DC supply for the inverter. The switching transistors of the inverter and of the step-up converter are driven by means of driver circuits, which are constructed as integrated circuits designed using analog techniques. In addition, modern electronic ballasts for electric lamps also contain a microcontroller, which is generally used for communication with a control unit arranged outside the ballast and for evaluating the control commands from this control unit for lamp operation and also for monitoring the lamp operation.
The European publication EP 0 708 579 A1 discloses a circuit arrangement for operating a high-pressure discharge lamp using an inverter, whose switching transistors have pulse-width modulated control signals applied to them by means of a microcontroller and a downstream integrated driver circuit. The pulse-width modulated control signals are generated with the aid of the auto-reload timer implemented in the microcontroller. In principle, this is a counting mechanism which operates at the operating cycle frequency of the microcontroller. During the counting operation, the reaching of a reference value and the overflow of the counting mechanism are monitored. During the time period which is needed to reach the reference value, the output of the auto-reload timer is at the xe2x80x9chighxe2x80x9d logic level, and during the time period which the counting mechanism needs to count up from the reference value until the counter overflows, the output of the auto-reload timer is at the xe2x80x9clowxe2x80x9d logic level. In this way, with the aid of the microcontroller, pulse-width modulated control signals for the inverter are generated, in order to permit lamp operation with a frequency-modulated voltage in a small frequency range and with a comparatively low number of discrete frequencies.
However, in this way, using cost-effective microcontrollers, no finely graduated pulse-width modulation control nor any finely graduated frequency control of the inverter can be carried out, since the smallest possible, adjustable change in the pulse width or in the frequency of the control signal which can be generated by the counting mechanism explained above is limited by the operating cycle frequency of the microcontroller and by the memory size of the counting mechanism. In order, for example, to permit dimming operation of fluorescent lamps on an electronic ballast by means of frequency modulation of the lamp current, frequency changes in steps of approximately 50 Hz are required in the frequency range from about 30 kHz to 100 kHz. If this frequency modulation is to be generated with the aid of the auto-reload timer, a microcontroller with an operating cycle frequency of more than 100 MHz is needed for this purpose. However, for cost reasons, such microcontrollers cannot be used in electronic ballasts for lamp operation.
It is an object of the invention to provide a microcontroller with an improved device for pulse-width modulation control and/or frequency control of a switched-mode power supply.
A further object of the invention is to provide a switched-mode power supply provided with a microcontroller with improved driving of the switching means of the switched-mode power supply.
In addition, it is an object of the invention to provide a ballast equipped with an inverter for operating at least one electric lamp which, with the aid of a microcontroller, permits finely graduated frequency control and/or pulse-width modulation control of the switching means of the inverter.
Furthermore, it is an object of the invention to specify an improved method for generating frequency control signals and/or pulse-width modulation control signals for the switching means of an inverter of a ballast for operating electric lamps by means of a microcontroller.
The aforementioned objects of the invention are achieved by the features of the independent patent claims 1, 10, 11 and 25, respectively. Advantageous refinements of the invention are described in the dependent patent claims.
The microcontroller according to the invention has at least one device for pulse-width modulation control and/or frequency control of a switched-mode power supply, this device having
a device for the alternate charging and discharging of a charge store that can be connected to the microcontroller or integrated into the microcontroller,
control means for the device for controlling the charging operations and/or the discharging operations, and
evaluation means which are used to evaluate the time periods required for recharging the charge store between different charge states and, on this basis, to generate a pulse-width modulation control signal and/or frequency control signal.
The device for the alternate charging and discharging of a charge store, and its control means, permit controlled charging operations and discharging operations to be carried out alternately with each other on a charge store and, with the aid of the evaluation means, the evaluation of the time periods which are needed for the partial charging and discharging of the charge store and on this basis the generation of a pulse-width modulation control signal and/or frequency control signal. Even if the microcontroller according to the invention has only a low operating cycle frequency, it can be used to implement finely graduated pulse-width modulation control and/or frequency control of a switched-mode power supply, since the device for the alternate charging and discharging of a charge store operates independently of the operating cycle frequency of the microcontroller.
The device for the alternate charging and discharging of a charge store advantageously comprises a controllable current source for applying an adjustable charging current to the charge store, and a controllable current sink for applying an adjustable discharging current to the charge store. As a result, the individual charging and discharging operations can be controlled independently of one another. In addition, the controllable current source and current sink can be produced in a known way by means of semiconductor technology and integrated into the microcontroller. In order to permit very fine graduation of the pulse-width modulation control signals and/or frequency control signals, the controllable current source and the controllable current sink are formed in such a way that their settings can be varied in relation to a reference current level, in each case with a resolution of at least 8 bits. The reference current level for the charging and the discharging current is in this case advantageously predefined with the aid of a nonreactive resistor. The control means provided for the device for the alternate charging and discharging of a charge store is advantageously at least one read/write memory. The content of the read/write memory can be updated continuously, for example under program control, and can be read in order to control the device for the alternate charging and discharging of a charge store. The control means advantageously comprise a switching means which are used to switch over the device for the alternate charging and discharging of a charge store from charging to discharging of the charge store when a first voltage value is reached, and to switch over the device for the alternate charging and discharging of a charge store from discharging to charging of the charge store when a second, lower voltage value is reached. With the aid of the switching means, the device for the alternate charging and discharging of a charge store is simply forced into mutually alternating charging and discharging operations, so that the charge state of the charge store is subjected to an incessant oscillation, which can be evaluated in order to generate frequency control signals and/or pulse-width modulation control signals. The first or the second voltage value can advantageously be adjusted by means of a read/write memory. As a result, the aforementioned oscillation of the charge state of the charge store can be influenced under program control.
The microcontroller according to the invention advantageously has a frequency divider or a pulse divider which, at its input, detects the changeover of the device for the alternate charging and discharging of a charge store from discharging to charging or from charging to discharging and divides the input signal into signals for the alternating control of alternately switching means of the switched-mode power supply. With the aid of the frequency divider or pulse divider, the oscillation of the charge state of the charge store can be evaluated in order to generate frequency control signals and/or pulse-width modulation control signals for the switching means of a switched-mode power supply with alternately switching means.
The microcontroller according to the invention additionally advantageously has interfaces for registering external signals or data and has a device for evaluating the external signals or data and for the program-controlled determination of actuating values for controlling the device for the alternate charging and discharging of a charge store. As a result, a control loop for the oscillation of the charge state of the charge store can be implemented on the basis of external operating parameters and the actuating values derived therefrom.
The switched-mode power supply according to the invention is distinguished by a microcontroller as claimed in one or more of claims 1 to 9. As distinguished from the previously conventional switched-mode power supplies, in the case of the switched-mode power supply according to the invention, the signals for pulse-width modulation or for frequency control of the switching transistors of the switched-mode power supply are generated by the microcontroller. The corresponding control signals are forwarded to the control electrodes of the switching transistors of the switched-mode power supply from the microcontroller, directly or if appropriate via driver circuits. As has already been mentioned above, these control signals are independent of the operating cycle frequency of the microcontroller.
The ballast according to the invention for operating at least one electric lamp has an inverter, at least one load circuit coupled to the inverter and having terminals for the at least one electric lamp, a control circuit for controlling the switching means of the inverter and a DC supply circuit for the inverter, the control circuit comprising a microcontroller having a device for pulse-width modulation control and/or frequency control of the switching means of the inverter. According to the invention, the device for pulse-width modulation control and/or frequency control of the switching means of the inverter has
a device for the alternate charging and discharging of a charge store,
control means for the device for the alternate charging and discharging of the charge store, which are used to control the charging operations and/or the discharging operations, and
evaluation means, which are used to evaluate the duration of the alternate charging and discharging operations of the charge store and on this basis to generate a frequency control signal and/or a pulse-width modulation control signal for controlling the switching means of the inverter.
The device for the alternate charging and discharging of a charge store, the charge store and the control means for the device for the alternate charging and discharging of a charge store form an oscillator, which operates independently of the operating cycle frequency of the microcontroller. The oscillations of the charge state of the charge store are evaluated with the aid of the evaluation means in order to generate frequency control signals and/or pulse-width modulation control signals for the inverter.
As a result of the aforementioned features of the ballast according to the invention, it becomes possible, with the aid of a relatively simple and cost-effective microcontroller, to implement all the essential control functions of a modern, dimmable ballast. In particular, these are the power factor correction, the control of the inverter, the control of the lamp electrode heating, the regulation of the load circuit, the brightness control of the lamps and monitoring of the lamp operation. As compared with previously conventional ballasts, which either have a freely oscillating inverter or an inverter controlled externally by means of an integrated circuit, and are able to ensure monitoring of the lamp operation only with numerous additional components, the ballast according to the invention manages with comparatively few additional components. Most functions in the ballast according to the invention are performed by the microcontroller. For example, end-of-life monitoring of the lamp can be implemented particularly simply with the ballast according to the invention, but is very complicated and expensive in ballasts according to the prior art.
For the alternate control of the switching means of the inverter, the device for pulse-width modulation control and/or frequency control advantageously has a frequency divider or a pulse divider which, at its input, detects the changeover of the device for the alternate charging and discharging of a charge store from discharging to charging or from charging to discharging of the charge store, and divides the input signal into signals for the alternating control of the switching means of the inverter.
In order to apply a heating current to the lamp electrodes, the ballast according to the invention advantageously has a heating device equipped with a controllable switching means, and the microcontroller has a comparator, which compares the charge state of the charge store with a reference value for the lamp electrode heating and which is used to generate a control signal for the pulse-width modulation of the controllable switching means of the heating device. As a result, the oscillation of the oscillator mentioned above can be evaluated not only for the purpose of controlling the inverter but additionally for the regulation of the heating current for the lamp electrodes. The reference value for the lamp electrode heating is advantageously adjustable by means of a read/write memory, in order to be able to adapt the heating current for the lamp electrodes to the different operating states of the lamp. The microcontroller additionally advantageously has synchronization means for synchronizing the controllable switching means of the heating device with a switching means of the inverter. As a result, driving the switching means of the heating device is simplified. In addition, the oscillatory behavior of the inverter is influenced positively as a result.
In the ballast according to the invention, the DC supply circuit of the inverter advantageously has a step-up converter for power factor correction and/or to achieve a most sinusoidal mains current consumption, and the microcontroller is equipped with a second device for the alternate charging and discharging of a second charge store, and also with second control means for this second device for controlling the charging and/or discharging operations. The second device for the alternate charging and discharging of a charge store, the second charge store and the second control means for this second device form a second oscillator, which likewise operates independently of the operating cycle frequency of the microcontroller. The microcontroller is additionally equipped with second evaluation means, which are used to evaluate the oscillations of the charge state of the second charge store in order to produce pulse-width modulation control signals and/or frequency control signals for the controllable switching means of the step-up converter. In particular, the time periods required for recharging the second charge store between different charge states are evaluated for this purpose. The microcontroller therefore additionally performs the control of the step-up converter as well.
In order to evaluate the oscillations of the charge state of the second charge store to produce pulse-width modulation control signals and/or frequency control signals, the second evaluation means advantageously have a first comparator to compare the charge state of the second charge store with a first voltage value, and a second comparator to compare the charge state of the second charge store with a second, lower voltage value, and the second control means advantageously have switching means which are used to switch over the second device for the alternate charging and discharging of a charge store from charging to discharging of the second charge store when the first voltage value is reached, and to switch over the second device for the alternate charging and discharging of a charge store from discharging to charging of the second charge store when the second, lower voltage value is reached. The first or the second voltage value can advantageously be adjusted by means of a read/write memory. As a result, the first or second voltage value can be varied, for example by means of a program executed by the microcontroller, and can be stored in order to control the second device for the alternate charging and discharging of a charge store.
The two devices for the alternate charging and discharging of a charge store advantageously in each case have a controllable current source for applying an adjustable charging current to the charge store and the second charge store, and in each case a controllable current sink for applying an adjustable discharging current to the charge store and, respectively the second charge store. The controllable current sources and current sinks may be produced in a known manner with the aid of semiconductor technology and integrated into the microcontroller. As a result, the two devices for the alternate charging and discharging of a charge store can be produced with simple means as a constituent part of the microcontroller. In order to ensure fine graduation of the frequency control signals or the pulse-width modulation control signals, the settings of the controllable current sources and current sinks can be varied in relation to a reference current level, in each case with a resolution of at least 8 bits. The aforementioned reference current level for the charging current and the discharging current can advantageously be predefined by means of a nonreactive resistor. This makes it possible to adapt the control of the inverter to different mains voltages by means of appropriate dimensioning of the nonreactive resistor. In order to save components, it is additionally preferable for only a single nonreactive resistor to be used to predefine the same reference current level for the charging and discharging currents of the two charge stores.
The microcontroller of the ballast according to the invention advantageously has at least one status bit which can be set and reset and via which the at least one controllable switching means of the inverter can be activated and deactivated. With the aid of this status bit, the inverter can be switched off in a simple way in the event of a defective lamp or during end-of-life monitoring of the lamp. Instead, of course, it is also possible for the controllable switching means of the step-converter and therefore the voltage supply to the inverter to be deactivated by means of the status bit, in order in a simple way to implement safety shutdown of the ballast. The microcontroller advantageously has one or more further status bits which can be set and reset, in order to be able to switch the pulse-width modulation control of the step-up converter or of the inverter off or on as desired. As a result, it is possible to apply only frequency control signals or pulse-width modulation control signals or frequency signals and pulse-width modulation control signals as desired to the controllable switching means of the step-up converter and of the inverter.
The microcontroller of the ballast according to the invention is advantageously provided with interfaces for registering operating parameters of the step-up converter or of the inverter or of the at least one electric lamp, in order, by means of a program-controlled device belonging to the microcontroller, to evaluate the operating parameters and to generate actuating values for controlling the devices for the alternate charging and discharging of a charge store, or to determine the reference value for the lamp electrode heating or the first or second reference value for the control of the step-up converter. The microcontroller is preferably provided with interfaces for registering at least one operating parameter of the step-up converter, of the inverter and of the load circuit or the at least one electric lamp. As a result, control loops can be built up for the step-up converter, the inverter and the load circuit with the lamp.
The ballast according to the invention advantageously has terminals and means for communication with an externally arranged control device, which are in turn connected to interfaces of the microcontroller. As a result, the ballast according to the invention is prepared to receive and process control commands from an external control device and to emit status messages to the external control device. These processes are likewise monitored by the microcontroller of the ballast according to the invention.
According to the invention, the method according to the invention of operating at least one electric lamp on a ballast which has an inverter with a control circuit containing a microcontroller for the switching means of the inverter and at least one load circuit coupled to the inverter and having terminals for the at least one lamp, is distinguished by the fact that, with the aid of the microcontroller, a charge store has a charging current and a discharging current alternately applied to it, and the duration of the alternate charging and discharging operations of the charge store is evaluated and on this basis a frequency control signal and/or a pulse-width modulation control signal for the alternating control of the switching means of the inverter is generated. The method according to the invention makes it possible, irrespective of the operating cycle frequency of the microcontroller, to generate control signals for frequency control and/or for pulse-width modulation of the inverter, with the aid of the microcontroller. As a result, a comparatively cost-effective microcontroller, that is to say a microcontroller with a low operating cycle frequency, can be used in the ballast according to the invention in order to implement all the essential control functions.
In order to drive the switching means of the inverter alternately, use is advantageously made of a frequency divider or a pulse divider, which detects the changeover of the device for the alternate charging and discharging of a charge store from discharging to charging of the charge store or from charging to discharging of the charge store.
The method according to the invention also permits heating of the lamp electrodes, by the heating current for the lamp electrodes being regulated by means of a controllable switching means. The signals for the pulse-width modulated control of the controllable switching means of the heating device are advantageously generated with the aid of a comparator, which compares the charge state of the charge store with a reference value for the lamp electrode heating. In this way, frequency control signals and/or pulse-width modulation control signals can be generated both for the switching means of the inverter and for the controllable switching means of the heating device, by the duration of the charging and discharging operations of the charge store being evaluated. The reference value for the lamp electrode heating is advantageously set on the basis of the desired heating power and stored in a read/write memory of the microcontroller. As a result, the heating power can be set under program control by means of the microcontroller. In addition, the controllable switching means for regulating the heating current are advantageously switched on synchronously with a switching means of the inverter. This simplifies the driving of the controllable switching means of the heating device. The duty cycle of the controllable switching means for regulating the heating current is preferably smaller than or equal to the duty cycle of the corresponding switching means of the inverter.
The DC supply to the inverter is regulated with the aid of a step-up converter, in order to ensure power factor correction and/or a sinusoidal mains current consumption. The pulse-width modulation control signals and/or the frequency control signals for the controllable switching means of the step-up converter are likewise advantageously generated with the aid of the microcontroller, by a second charge store being recharged between different charge states, and the time periods for recharging the second charge store being evaluated in order to generate the pulse-width modulation control signals and/or the frequency control signals for the controllable switching means of the step-up converter. The same microcontroller as is used to control the inverter can in this way also be used to control the step-up converter. The recharging of the second charge store can be detected and evaluated in a simple way by means of two comparators, by the first comparator comparing the charge state of the second charge store with a first voltage value, and the second comparator comparing the charge state of the second charge store with a second, lower voltage value. When the first voltage value is reached, the charging operation is terminated and the discharging operation of the second charge store is started, while when the second, lower voltage value is reached, the discharging operation is terminated and the charging operation of the second charge store is restarted anew. The first or second voltage value is advantageously set by means of a read/write memory. As a result, the corresponding voltage value can be varied under program control.
Advantageously, with the aid of the microcontroller, actual values of operating parameters of the inverter and/or of the DC supply circuit of the inverter and/or of the at least one electric lamp are monitored and evaluated in order to control the charging or discharging operations of the charge store and/or to determine the reference value for the lamp electrode heating and/or to determine the first and/or second voltage value. As a result, control loops for controlling the inverter and its DC supply and also for the lamp electrode heating can be implemented.